package com.xyy.yueshijia.view.store;

import android.content.Context;
import android.widget.ImageView;

import com.superrecycleview.superlibrary.adapter.BaseViewHolder;
import com.superrecycleview.superlibrary.adapter.SuperBaseAdapter;
import com.xyy.yueshijia.R;
import com.xyy.yueshijia.bean.shop.StoreQueryBean;
import com.xyy.yueshijia.utils.ImageLoader;

import java.util.List;

/**
 * Created by lxs on 2017/2/9.
 */

public class StoreQueryAdapter extends SuperBaseAdapter<StoreQueryBean> {
    private Context mContext;

    public StoreQueryAdapter(Context context, List<StoreQueryBean> data) {
        super(context, data);
        this.mContext = context;
    }

    @Override
    protected void convert(BaseViewHolder holder, StoreQueryBean item, int position) {
            holder.setText(R.id.shop_query_special_title_txt,item.getSpecial_title());

        ImageLoader.getSingleton().displayImage(mContext
                , item.getSpecial_image()
                , (ImageView) holder.getView(R.id.shop_query_img));
    }

    @Override
    protected int getItemViewLayoutId(int position, StoreQueryBean item) {
        return R.layout.item_store_query;
    }
}
